﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="setImage.aspx.cs" Inherits="setImage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>SetLogo</title>
   <script language="javascript">
function resize() {
resizeTo(400,350);
} 
</script>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style3
        {
            width: 116px;
        }
    </style>
    <script type="text/javascript">
          function triggerFileUpload()
          {
                document.getElementById("File1").click();
          }
    </script>
</head>
<body onload="resize()">
    <form id="form1" runat="server">
    <div align="center">
    
        <table cellpadding="1" cellspacing="1" style="border: 4px inset #3270B2" 
            border="0" width="450px">
            <tr>
                <td style="text-align: center; width: 300px; font-family: 'Arial Narrow'; font-size: 16px; font-weight: bolder; font-style: normal; font-variant: normal; text-transform: none; color: #FFFFFF; background-color: #3270B2;" 
                    width="150px" colspan="3"  >
                    Click Image</td>
            </tr>
            <tr>
                <td 
                    width="150px"  >
                    <asp:ImageButton ID="ImageButton1" runat="server" 
                        ImageUrl="~/img/default_user.jpg" Width="100px" 
                        onclick="ImageButton1_Click" />
                </td>
                <td 
                    
                    
                    style="text-align: center; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #3270b2;" 
                    class="style3">
                    <asp:ImageButton ID="ImageButton2" runat="server" 
                        ImageUrl="~/img/default-userlady.png" Width="100px" 
                        style="text-align: center" onclick="ImageButton2_Click" />
                </td>
                <td width="100px" 
                    style="border-bottom: 1px solid #3270b2; text-align: center; width: 75px;">
                    <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/img/logocasa.jpg" 
                        Width="100px" />
                </td>
            </tr>
            <tr>
                <td style="text-align: center; width: 300px; font-family: 'Arial Narrow'; font-size: 16px; font-weight: bolder; font-style: normal; font-variant: normal; text-transform: none; color: #FFFFFF; background-color: #3270B2;" 
                    colspan="3">
                    Choose File</td>
            </tr>
            <tr>
                <td 
                    colspan="1">
                    &nbsp;</td>
                    <td colspan="2" valign="bottom">
                        <table cellpadding="0" cellspacing="0" class="style1">
                            <tr>
                                <td>
                                    <asp:Image ID="Image1" runat="server" 
                                        Width="100px" BackColor="Silver" ImageUrl="~/img/yourlogo.png" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                     <div>
                                         <asp:FileUpload ID="File1" runat="server" Visible="true" Width="1px" />
          <br />

          <asp:Button ID="Button1" OnClientClick="triggerFileUpload()" runat="server" Text="Browse" />
        
        
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
                                             Text="Set Logo" />
        <br /> <span  id="Span1" runat="Server" style="font-family: 'Arial Narrow'; font-size: medium;  font-style: normal; color: #FF0000" />
                                         <p>
            <asp:RegularExpressionValidator 
             id="RegularExpressionValidator1" runat="server" 
             ErrorMessage="Only .gif, .png , .png files allowed!" 
             ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.png|.PNG|.jpg|.JPG|.gif|.GIF)$" 
             ControlToValidate="File1">
            </asp:RegularExpressionValidator>
            <br />
        </p>      
    </div></td>
                            </tr>
                        </table>
                </td>
            </tr>
            <tr><td colspan="3" align="center">
                <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/img/submit.gif" />
                </td></tr>
        </table>
        
    
    </div>
    </form>
</body>
</html>
